var fs = require("fs");
var path = require("path");

var filePath1 = path.join(__dirname,"/from.txt");
var readable = fs.createReadStream(filePath1);

var filePath2 = path.join(__dirname,"/to.txt");
var writable = fs.createWriteStream(filePath2);

readable.pipe(writable);
console.log("successfully!");